import React from 'react';
import { View } from 'react-native';
import { Provider } from 'mobx-react';
import Navigation from './navigation';
import MyLoading from './component/MyLoading';
// 获取mobx-store实例
import store from './mobx';

console.log('==================>App初始化');

export default () => (
  <Provider rootStore={store}>
    <View style={{ flex: 1 }}>
      <Navigation />
      {
        <MyLoading
          ref={ref => {
            global.mLoadingComponentRef = ref;
          }}
        />
      }
    </View>
  </Provider>
);
